import {
	defineConfig
} from "vite";
import uni from "@dcloudio/vite-plugin-uni";
import autoImport from 'unplugin-auto-import/vite'
import {
	resolve
} from "path";

export default defineConfig({
	plugins: [
		uni(),
		autoImport({
			imports: ['vue', 'uni-app', 'pinia'],
			include: [
				/\.vue$/,
				/\.vue\?vue/,
				/\.jsx$/,
			],
			dts: false
		})
	],
	server: {
		proxy: {
			'/api': {
				target: 'http://192.168.1.103:8921/api',
				changeOrigin: true,
				rewrite: path => path.replace(/^\/api/, ''),
			}
		}
	}
});